package controller;

import dao.UserDao;
import model.User;

public class UserController {

    static UserDao userDao = new UserDao();

    public static int login(String name, String password) {
        return userDao.Login(name, password);
    }

    public int judges(String name) {
        return userDao.judges(name);
    }

    public void addUser(User user) {
        userDao.addUser(user);
    }

    public boolean judge(String name, String pass) {
        return !name.isEmpty() && name.length() <= 15 && pass.length() >= 6 && pass.length() <= 15;
    }
}